package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.qo.TransferCreditQueryObject;
import cn.wolfcode.p2p.business.domain.CreditTransfer;
import com.github.pagehelper.PageInfo;

public interface ICreditTransferService {
    int save(CreditTransfer creditTransfer);
    int update(CreditTransfer creditTransfer);

    CreditTransfer get(Long id);

    PageInfo listCanTransferCredit(TransferCreditQueryObject qo);

    /**
     * 转让债权标
     * @param bidId
     */
    void creditTransfer(Long[] bidId);

    /**
     * 转让中的债权标
     * @param qo
     * @return
     */
    PageInfo queryPage(TransferCreditQueryObject qo);

    /**
     * 认购债权转让标
     * @param id
     */
    void subscribe(Long id);

    /**
     * 找到正在招标中的债权转让标
     * @param bidId
     * @return
     */
    CreditTransfer findNeedCancel(Long bidId);

    /**
     * 撤销债权标
     * @param needCancel
     */
    void cancel(CreditTransfer needCancel);
}
